Is there an easy way to make `boost::ptr_vector` more debugger friendly in Visual Studio?

Posted by Billy ONeal on Stack Overflow See other posts from Stack Overflow or by Billy ONeal
Published on 2010-12-25T23:20:42Z Indexed on 2010/12/26 0:54 UTC
Read the original article Hit count: 298

I'm considering using boost::ptr_container as a result of the responses from this question. My biggest problem with the library is that I cannot view the contents of the collection in the debugger, because the MSVC debugger doesn't recognize it, and therefore I cannot see the contents of the containers. (All the data gets stored as void * internally)

I've heard MSVC has a feature called "debugger visualizers" which would allow the user to make the debugger smarter about these kinds of things, but I've never written anything like this, and I'm not hugely firmiliar with such things.

For example, compare the behavior of boost::shared_ptr with MSVC's own std::tr1::shared_ptr. In the debugger (i.e. in the Watch window), the boost version shows up as a big mess of internal variables used for implementing the shared pointer, but the MSVC version shows up as a plain pointer to the object (and the shared_ptr's innards are hidden).

How can I get started either using or implementing such a thing?

© Stack Overflow or respective owner

Related posts about c++

Related posts about visual-c++